<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
 */

namespace App\Controller;

use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\JTAuthMiddleware;
use App\Service\AppStore\ArticleDetailService;
use App\Service\AppStore\ArticleListService;
use App\Service\AppStore\CategoryService;
use App\Service\AppStore\MatchPickService;
use App\Service\AppStore\MatchUserListService;
use App\Service\AppStore\RecArticleService;
use App\Service\AppStore\RecUserService;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;

/**
 * IOS上架版本
 * @Controller(prefix="appstore")
 */
class AppStoreController extends AbstractController
{
    /**
     * 首页-推荐文章列表
     * @RequestMapping(path="article/rec_list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function rec_article(RecArticleService $service)
    {
        return $service->response();
    }

    /**
     * 分类文章列表
     * @RequestMapping(path="article/list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function article_list(ArticleListService $service)
    {
        return $service->response();
    }

    /**
     * 首页-文章详情
     * @RequestMapping(path="article/detail", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function article_detail(ArticleDetailService $service)
    {
        return $service->response();
    }

    /**
     * 发现-分类类别
     * @RequestMapping(path="discover/category", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function discover_category(CategoryService $service)
    {
        return $service->response();
    }

    /**
     * 发现-分类推荐用户
     * @RequestMapping(path="discover/rec_users", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function discover_rec_users(RecUserService $service)
    {
        return $service->response();
    }

    /**
     * 匹配-星球用户列表
     * @RequestMapping(path="match/user_list", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function match_user_list(MatchUserListService $service)
    {
        return $service->response();
    }

    /**
     * 匹配请求
     * @RequestMapping(path="match/pick", methods="post")
     * @Middleware(JTAuthMiddleware::class)
     */
    public function match_pick(MatchPickService $service)
    {
        return $service->response();
    }
}
